#ifndef _VOLUME_INTEGRATOR_H_
#define _VOLUME_INTEGRATOR_H_

#include "spectrum.h"

class VolumeIntegrator{
public:
	virtual spectrum_t Li(const ray_t& r, spectrum_t *transmittance)const = 0;
	virtual spectrum_t Transmittance(const ray_t& r)const = 0;
	virtual ~VolumeIntegrator(){}
};

class NullVolumeIntegrator:public VolumeIntegrator{
public:
	virtual spectrum_t Li(const ray_t& r, spectrum_t *transmittance) const
	{
		*transmittance = Transmittance(r);
		spectrum_t t;
		vclr(t);
		return t;
	}
	virtual spectrum_t Transmittance(const ray_t& r)const
	{
		spectrum_t t;
		//vinit(t,exp(-r.maxt/300),exp(-r.maxt/300),exp(-r.maxt/300));
		vinit(t,1,1,1);
		return t;
	}
};
#endif